#
# Program to find new coordinates when the angle of a point is compressed
# to half original value in the negative z direction
#


import math

def compressAngle(x,y,z):
    r = math.sqrt(x*x + y*y + z*z)
    zn = - math.sqrt(0.5*(r*(r - z) ))
    xn = r*(math.sqrt((1+math.sqrt(1 - x*x/(r*r)))/2))
    yn = r*(math.sqrt((1+math.sqrt(1 - y*y/(r*r)))/2))
    return xn, yn, zn


print compressAngle(0, 1, 1)
    